string table use during buffer assignment

Given the following code:

 

Module mod = current Module
Object obj ; for obj in entire mod do
{
        Buffer buf = create()
        buf = probeAttr_(obj, "AttrName")
        delete(buf)
}

 

 

My question is: Since the probeAttr result is put directly into a Buffer, has the string table been used? In other words, after running this code has the string table sized increased?

 


oaklodge - Fri Nov 17 04:05:53 EST 2017

Re: string table use during buffer assignment
pommCannelle - Fri Nov 17 04:34:28 EST 2017

No.

 

;)
If my memories are goods, problem occures with the += operator ... but the direct allocation is safe. 
You need to use tempStringOf(Buffer) to use your buffer content without string table stimulation ... 
And may be to enhence the combine function to deal with the += need ... 
Something like ... 
 

void combine ( Buffer b, string s ) {
    if (null b || null s) return
    Buffer tmp = create
    tmp = s; combine ( b, tmp, 0 )
    delete tmp
}

But buffers seem to be the good way to avoid memory leaks with string in DXL ;)

)